# This build file includes a target for the Ruby wrapper library for
# google-cloud-config_delivery.

load(
    "@com_google_googleapis_imports//:imports.bzl",
    "ruby_cloud_gapic_library",
    "ruby_gapic_assembly_pkg",
    "nodejs_gapic_combined_pkg"
)

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

# Export yaml configs.
exports_files(glob(["*.yaml"]))

# Generates a Ruby wrapper client for configdelivery.
# Ruby wrapper clients are versionless, but are generated from source protos
# for a particular service version, v1alpha in this case.
ruby_cloud_gapic_library(
    name = "configdelivery_ruby_wrapper",
    srcs = ["//google/cloud/configdelivery/v1alpha:configdelivery_proto_with_info"],
    extra_protoc_parameters = [
        "ruby-cloud-gem-name=google-cloud-config_delivery",
        "ruby-cloud-wrapper-of=v1:0.0",
    ],
)

# Open Source package.
ruby_gapic_assembly_pkg(
    name = "google-cloud-configdelivery-ruby",
    deps = [
        ":configdelivery_ruby_wrapper",
    ],
)

nodejs_gapic_combined_pkg(
    name = "google-cloud-configdelivery-nodejs",
    default_version = "v1",
    templates_excludes = ["package.json", ".Owlbot.yaml"],
    deps = [
        "//google/cloud/configdelivery/v1:configdelivery-v1-nodejs",
        "//google/cloud/configdelivery/v1alpha:configdelivery-v1alpha-nodejs",
        "//google/cloud/configdelivery/v1beta:configdelivery-v1beta-nodejs"
    ],
)
